package com.drg.center.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.drg.center.entity.DrgPatientCaseAdvicePO;
import com.drg.center.mapper.DrgPatientCaseAdviceMapper;
import com.guaike.core.mybatis.plugins.BaseDAO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class DrgPatientCaseAdviceDAO extends BaseDAO<DrgPatientCaseAdviceMapper, DrgPatientCaseAdvicePO> {


    public List<DrgPatientCaseAdvicePO> findCaseAdvice(String caseCode, String adviceContentCode) {
        LambdaQueryWrapper<DrgPatientCaseAdvicePO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(DrgPatientCaseAdvicePO::getAdviceContentCode, adviceContentCode);
        queryWrapper.eq(DrgPatientCaseAdvicePO::getCaseCode, caseCode);
        return getBaseMapper().selectList(queryWrapper);
    }
}
